import { DirectiveOptions } from 'vue/types/options';
import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store/index';

import '@/assets/style/index.scss';

// 插件
import './utils/class_component_hooks';
import './utils/element_ui';
import SvgIcon from 'vue-svgicon';

import '@/permission';
import '@/icons/components';
import i18n from '@/lang';

// 指令
import permission from '@/directive/permission';

Vue.use(SvgIcon, {
  tagName: 'svg-icon',
  defaultWidth: '1em',
  defaultHeight: '1em',
});

Vue.directive('permission', permission as DirectiveOptions);

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  i18n,
  render: (h: any) => h(App),
}).$mount('#app');
